//@ResponseBody
//@RequestMapping(value = "/exportExcel", method = RequestMethod.GET)
//public void exportExcel(HttpServletRequest request, HttpServletResponse response) throws Exception {
//        SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd");//设置日期格式
//        String year = df.format(new Date());
//        //为了方便大家理解，选择用获取数据表中的全部数据为例子
//        List<Leader> list = leaderService.getList();
//        //设置Excel表头
//        String[] title = {"编号", "领导姓名", "性别", "电子邮箱", "联系电话", "入职时间"};
//        //设置Excel文件名
//        String filename = "LeaderList_"+year+".xls";
        //设置工作表名称
//        String sheetName = "sheet1";
//        //开始对从数据库中获取到的数据进行处理
//        String[][] content = new String[list.size()][6];
//        try {
//        for (int i = 0; i < list.size(); i++) {
//        content[i][0] = String.valueOf(list.get(i).getLeaderId());
//        content[i][1] = list.get(i).getName();
//        if(list.get(i).getSex() == 0){
//        content[i][2] = "女";
//        }else{
//        content[i][2] = "男";
//        }
//        content[i][3] = list.get(i).getEmail();
//        content[i][4] = list.get(i).getPhone();
//        content[i][5] = String.valueOf(list.get(i).getIntime());
//        }
//        } catch (Exception e) {
//        e.printStackTrace();
//        }
//        HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook(sheetName, title, content, null);
//        try {
//        // 响应到客户端
//        this.setResponseHeader(response, filename);
//        OutputStream os = response.getOutputStream();
//        wb.write(os);
//        os.flush();
//        os.close();
//        } catch (Exception e) {
//        e.printStackTrace();
//        }
//        }
///**
// * 向客户端发送响应流方法
// *
// * @param response
// * @param fileName
// */
//public void setResponseHeader(HttpServletResponse response, String fileName) {
//        try {
//        try {
//        fileName = new String(fileName.getBytes(), "UTF-8");
//        } catch (UnsupportedEncodingException e) {
//        e.printStackTrace();
//        }
//        response.setContentType("application/vnd.ms-excel");
//        response.setHeader("Content-disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
//        } catch (Exception ex) {
//        ex.printStackTrace();
//        }
//        }
